import { http,http_login } from "../axios"

export default {
  // 上传文章
  uploadArticle(data){
    return http_login.post('/api-article/uploadArticle/',data)
  },
  // 获取用户全部文章
  getUserArticle(data=null){
    return http.post('/api-article/getUserArticle/',data)
  },
  // 删除文章
  removeArticle(data){
    return http_login.post('/api-article/removeArticle/',data)
  },
  // 修改文章
  changeArticle(data){
    return http_login.post('/api-article/changeArticle/',data)
  },
  // 获取全部文章数据
  getAllArticle(){
    return http.post('/api-article/getAllArticle/')
  },
  // 获取单个文章数据
  getArticle(data){
    return http.post('/api-article/getArticle/',data)
  },
  // 点赞文章
  isLike(data){
    return http_login.post('/api-article/isLike/',data)
  },
  // 收藏文章
  isCollect(data){
    return http_login.post('/api-article/isCollect/',data)
  },
  // 获取用户收藏文章
  getUserCollect(){
    return http.post('/api-article/getUserCollect/')
  },
}